<!DOCTYPE html>
<html>
<head>
    <title>维护规程详情</title>
    #parse("sys/header.html")
</head>
<body>
<div>
<table id="jqGrid"></table>
</div>
</body>
<script>
    var plan_id = getQueryString("plan_id");

    $(function () {
        $("#jqGrid").Grid({
            // url: '../maintainplan/details?planId='+ plan_id,
            url: '../devplangcrecord/list2?id='+plan_id,
            colModel: [
                {label: '选项编码', name: 'code', index: 'CODE', width: 100},
                {label: '选项名称', name: 'name', index: 'NAME', width: 160},
                {label: '设备类型', name: 'devTypeName', index: 'DEV_TYPE_NAME', width: 160},
                {label: '供应厂家', name: 'devSupply', index: 'DEV_SUPPLY', width: 160},
                {label: '检查标准', name: 'checkSt', index: 'CHECK_ST', width: 160},
                {label: '方法手段', name: 'methodType', index: 'METHOD_TYPE', width: 160},
                {label: '选项备注', name: 'remark', index: 'REMARK', width: 160},
                {
                    label: '实施频率', name: 'freRate', index: 'FRE_RATE', width: 80,
                    formatter: function (value) {
                        return sysEnums.FRERATE[value];
                    }
                },
                {label: '人次', name: 'preEv', index: 'PER_EV', width: 80}

            ]
        });

    });

    var vm ;
    vm = new Vue({
        el: '#rrapp',
        data: {
            devMaintenPlan: {

            }
        },
        methods: {

            reload: function (event) {
                var page = $("#plan_record").jqGrid('getGridParam', 'page');
                $("#plan_record").jqGrid('setGridParam', {
                    page: page
                }).trigger("reloadGrid");
            }
        }
    });


    function loadRecord(plan_id){
        Ajax.request({
            url: "../maintainplan/info/" + plan_id,
            async: true,
            successCallback: function (r) {
                vm.devMaintenPlan = r.devMaintenPlan;
            }
        });
    }
</script>
</html>
